<extend name="./Public/Home/master.html" />
<block name="title">
    </div>
    <!--导航结束-->
    <div class="clear"></div>

    </div>
    <!--头部结束-->
    <!--中间开始-->
    <div id="content">
        <div class="list">
            <div class="main">
                <h4 class="listoption">
                    <a href="#">首页</a>&gt;
                    <foreach name="fatherData" item="vo">
                        &gt;<a href="#">{$vo['cname']}</a>
                    </foreach>
                </h4>
                <style>
                    .list .postion dl a.red{
                        color: red;
                    }
                </style>
                <div class="postion"    class="red">
                    <foreach name="finalTmep" key="k" item="vo">
                        <!--将分配到页面的数据，赋值给另外一个变量，不破换原数据，方便后面使用-->
                            <?php
                                $temp  =  $param;
                                $temp[$k] = 0;
                             ?>
                    <dl>
                        <dt>{$vo['name']}:</dt>

                        <dd>
                            <a href="{:U('Home/List/index',['cid'=>$_GET['cid'],'param'=>implode('_',$temp)])}"  <?php if($param[$k]==0){ ?> class="red"<?php } ?> >不限</a>
                            <foreach name="vo['value']" item="mm">
                                <!--当点击筛选时将$vv里的gtid值赋值给$temp里的$k，再让$param里的$k等于$vv[gtid]-->
                               <?php  $temp[$k]=$mm['gtid']; ?>
                                <a style="min-width: 150px" href="{:U('Home/List/index',['cid'=>$_GET['cid'],'param'=>implode('_',$temp)])}"  <?php if($param[$k]==$mm['gtid']){ ?> class="red" <?php } ?> >{$mm['gtvalue']}</a>
                            </foreach>
                        </dd>

                    </dl>
                    </foreach>
                </div>

            </div>
        </div>

        <div class="listcontent">
            <div class="main">
                <style>
                    .main ul  p{
                        width: 500px;
                        height: 50px ;
                        margin: 0 auto;
                        font-size: 25px;
                        line-height: 50px;
                        text-align: center;
                    }
                    .main ul  p a{
                        width: 500px;
                        height: 50px ;
                        margin: 0 auto;
                        font-size: 25px;
                        text-align: center;
                        color: red;
                    }
                </style>
                <ul>
                    <?php if(!$goodData){ ?>
                    <p>
                        该分类下暂无商品
                         <a href="{:U('Home/Index/index')}">继续购物</a>
                    </p>

                    <?php }else{ ?>
                    <foreach name="goodData" item="vo">
                    <li>
                        <div class="listdesc">
                            <dl class="desc">
                                <a href="{:u('Home/Content/index',['gid'=>$vo['gid']])}" class="pro_list">
                                    <dt class="pic"><img class="lazy" src="__ROOT__/{$vo['pic']}"  alt="360手机f4标准版移动4G魔力白"></dt>
                                    <dd class="cont">
                                        <span class="title">{$vo['gname']}</span>
                                        <span class="price">{$vo['shopprice']}元</span>
                                    </dd>
                                </a>
                                <dd class="btns">
                                    <a href="javascript:;" class="add-cart" ><i></i><em>加入购物车</em></a>
                                </dd>
                            </dl>
                        </div>
                    </li>
                    </foreach>
                    <?php } ?>
                </ul>
            </div>
        </div>
    </div>
    </div>
    <!--中间结束-->
</block>>